﻿@model IEnumerable<PageViewModel>
@{ 
	string title = string.Format(SiteStrings.Pages_ForTag, ViewData["Tagname"]);
	ViewBag.Title = title;
}
<h1>@title</h1>

@if (Model.Count() > 0)
{
<table class="table table-striped">
	@foreach (PageViewModel pageModel in Model)
	{
		<tr>
			<td class="stretch">@Html.ActionLink(pageModel.Title, "Index", "Wiki", new { id = pageModel.Id, title = pageModel.EncodedTitle }, null)</td>
			@if (RoadkillContext.IsLoggedIn)
			{
			<td class="edit">@Html.ActionLink(SiteStrings.Shared_EditLink,"Edit",new { id = pageModel.Id}, new {@class = "btn btn-mini btn-primary" } )</td>
			}
			else
			{
			<td></td>
			}
		</tr>
	}
</table>
}
else
{
	<p>@string.Format(SiteStrings.Pages_ForTag_NoPages, ViewData["Tagname"])</p>
}